import java.io.FileNotFoundException;

public class Main {
    public static void main4(String[] args) throws FileNotFoundException{
        Config config = new Config();
        config.OpenConfig("config");
    }

    public  void func5(int a) throws CloneNotSupportedException{
        if(a==19) throw new CloneNotSupportedException();
    }

    public static void main3(String[] args) throws CloneNotSupportedException{
        Main main = new Main();
        main.func5(9);
        System.out.println(222);


    }

    public int func4(int[] arr,int index){
        if (arr==null) throw new NullPointerException();//空指针异常

        if (index<0||index>=arr.length){
            throw new ArrayIndexOutOfBoundsException();
        }

        return arr[index];
    }

    public static void func3(int a){
            if (a==10){
                throw new RuntimeException();
            }
    }

    public static void main2(String[] args) {
        int[] num = null;
        System.out.println(num.length);
    }

    public static void main1(String[] args) {
//        func1(10);
//        func2(20);

//        System.out.println(10/0);

//        int[] num = null;
//        System.out.println(num.length);

        int[] num2 ={1,2,3};
        System.out.println(num2[3]);
    }
    public static void func1(int a){
        if(a==10){
            throw new RuntimeException("zzz...");
        }
    }
    public static void func2(int a) throws CloneNotSupportedException {
        if(a==20){
            throw new CloneNotSupportedException("aaa...");
        }
    }
}